<?php
class CouponAction extends MemberAction{
	public function index(){
		$list = D('Coupon') -> _list(array('site_id' => __SITEID__, 'member_id' => $this->memberInfo['id']), 'id desc');
		foreach($list['list'] as $k => $v){
			$list['list'][$k]['coupon'] = M('Coupon') -> where(array('id' => $v['coupon_id'], 'site_id' => __SITEID__)) -> find();
		}
		$this->assign($list);
		$this->display();
	}
}